CREATE PROCEDURE dbo.EditorUpdateModel
	@EditorKey INT,
	@UserName NVARCHAR(50),
	@FirstName NVARCHAR(50),
	@LastName NVARCHAR(50),
	@EmailAddress NVARCHAR(254),
	@PasswordSalt VARCHAR(MAX),
	@PasswordHash VARCHAR(MAX),
	@IsEnabled BIT,
	@Audit_UserKey INT
AS
	SET NOCOUNT ON

	UPDATE dbo.Editor SET
		UserName = @UserName,
		FirstName = @FirstName,
		LastName = @LastName,
		EmailAddress = @EmailAddress,
		PasswordSalt = @PasswordSalt,
		PasswordHash = @PasswordHash,
		IsEnabled = @IsEnabled
	WHERE EditorKey = @EditorKey


	EXEC dbo.EditorSelectModel @EditorKey = @EditorKey, @Audit_UserKey = @Audit_UserKey

RETURN 0
